import java.util.Scanner;

//递归求 N 的阶乘
public class TextDemo {
    public  static int rec(int n){
         if(n==1)
             return 1;
         else
             return n*rec(n-1);

    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ret=rec(n);
        System.out.println(ret);
    }
}
